<!--
 * @Description: ******************0^0**********************
 * @Author: wangwei
 * @Date: 2018-07-31 12:34:25
 * @LastEditTime: 2019-08-15 11:35:02
 * @LastEditors: wagnwei
 -->
<template>
    <div id="app">
        <router-view></router-view>
    </div>
</template>
<script>
import {login} from './api/api'
export default {
    data(){
        return{
           
        }
    },
    created(){
        this.getinfo()
    },
    mounted(){
         console.log(this.$store.state.route.path,"----------获取路由的路径-------------------")
         console.log(this.$store.state.route.params,"---------获取参数方式1 -----------------")
         console.log(this.$store.state.route.query,"----------获取参数方式2------------------")
    },
    methods:{
       async getinfo(){
        //    请求1
           this.$axios.post('/juhepai/toutiao/index?type=&key=76db99a8de0bb25da0ea78e8747f4971').then((url) => {
                    console.log(">>>>>>>>>>>",url)
                })

        // 请求2
           let res = await login({type:'top',key:'76db99a8de0bb25da0ea78e8747f4971'});
            console.log(res,"lllllllllllllll")
        }
    }
}
</script>

<style>
    @import "../static/css/main.css";
    @import "../static/css/color-dark.css";     /*深色主题*/
    @import "../static/css/theme-green/color-green.css";   /*浅绿色主题 */
</style>